#include "comm.hpp"

int main()
{
    int fd = open(MAPED_FILE, O_RDWR);
    char* addr = (char*)mmap(nullptr, LENGTH, PROT_READ, MAP_SHARED, fd, 0);
    
    char buff[1024]; buff[0] = '\0';
    memcpy(buff, addr, sizeof(buff));
    log(LOG, "process b get a msg...");
    std::cout << "prpcess b get a msg: ";
    std::cout << buff << std::endl;
    close(fd);
    munmap(addr, LENGTH);
    log(LOG, "process b close mmaped file done...");
    return 0;
}